<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/includes/common-import.jsp"%>

<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<head>
	<meta charset="utf-8" />
	<title>${systemName}</title>
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<%@ include file="/WEB-INF/includes/common-component-edit.jsp"%>
</head>
<body class="page-header-fixed">
	<%@ include file="/WEB-INF/includes/header.jsp"%>
	<div class="page-container row-fluid">
		<%@ include file="/WEB-INF/includes/leftMenu.jsp"%>
		<div class="page-content">
			<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<h3 class="page-title">
							学生管理
						</h3>
					</div>
				</div>
				<!-- END PAGE HEADER-->
				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">

					<div class="span12">

						<div class="portlet box blue" id="form_wizard_1">
							<div class="portlet-title">
								<div class="caption">
									<i class="icon-reorder"></i> 基本信息
								</div>
							</div>

							<div class="portlet-body form">

								<form id="inputForm" class="form-horizontal" action="${basePath}student/${action}" method="post" >
									<input type="hidden" name="id" value="${student.id }"/>
									<div class="alert alert-error ${empty MESSAGE ?'hide':'' }">
										<button class="close" data-dismiss="alert"></button>
										<span>${MESSAGE }</span>
									</div>
									
<div class="control-group"> 
   <label class="control-label"> 
       账号<span class="required">*</span> 
   </label> 
   <div class="controls"> 
       <input name="loginname" class="span6 m-wrap required" type="text" value="${student.loginname}"> 
   </div> 
</div> 
<div class="control-group"> 
   <label class="control-label"> 
       密码<span class="required">*</span> 
   </label> 
   <div class="controls"> 
       <input id="passwd" name="passwd" class="span6 m-wrap required" type="text" value="${student.passwd}"> 
   </div> 
</div> 
<div class="control-group"> 
   <label class="control-label"> 
      确认 密码<span class="required">*</span> 
   </label> 
   <div class="controls"> 
       <input id="passwd2" class="span6 m-wrap required" type="password" /> 
   </div> 
</div> 
<div class="control-group"> 
   <label class="control-label"> 
       姓名<span class="required">*</span> 
   </label> 
   <div class="controls"> 
       <input name="truename" class="span6 m-wrap required" type="text" value="${student.truename}"> 
   </div> 
</div> 
<div class="control-group">
	<label class="control-label">性别</label>
	<div class="controls">
		<label class="radio">
			<div class="radio">
				<span><input name="sex" type="radio" value="男" data-title="男" ${student.sex=='男'?'checked':'' }></span>
			</div> 男
		</label>
		<div class="clearfix"></div>
		<label class="radio">
			<div class="radio">
				<span><input name="sex" type="radio" value="女" data-title="女" ${student.sex=='女'?'checked':'' }></span>
			</div>女
		</label>  
		<div id="form_gender_error"></div>
	</div>
</div>
<div class="control-group"> 
   <label class="control-label"> 
       年级<span class="required">*</span> 
   </label> 
   <div class="controls"> 
       <select id="gradeId" name="gradeId" class="span6 m-wrap required">
       		<option value="" ></option>
	   		<c:forEach items="${gradeList }" var="gradeList">
	   			<option value="${gradeList.id }" ${gradeList.id==student.gradeId?'selected=selected':'' }>${gradeList.gradeName }</option>
	   		</c:forEach>
   		</select> 
   </div> 
</div> 
<div class="control-group"> 
   <label class="control-label"> 
       专业<span class="required">*</span> 
   </label> 
   <div class="controls"> 
       <select id="professionalId" name="professionalId" class="span6 m-wrap required">
       		<option value="" ></option>
	   		<c:forEach items="${professionalList }" var="professionalList">
	   			<option value="${professionalList.id }" ${professionalList.id==student.professionalId?'selected=selected':'' }>${professionalList.proName }</option>
	   		</c:forEach>
   		</select>
   </div> 
</div> 
<div class="control-group"> 
   <label class="control-label"> 
       班级<span class="required">*</span> 
   </label> 
   <div class="controls"> 
       <select id="classId" name="classId" class="span6 m-wrap required">
       		<option value="" ></option>
	   		<c:forEach items="${classList }" var="classList">
	   			<option value="${classList.id }" ${classList.id==student.classId?'selected=selected':'' }>${classList.className }</option>
	   		</c:forEach>
   		</select> 
   </div> 
</div> 
<div class="control-group"> 
   <label class="control-label"> 
       备注
   </label> 
   <div class="controls"> 
       <input name="remark" class="span6 m-wrap" type="text" value="${student.remark}"> 
   </div> 
</div> 

									
									<div class="form-actions clearfix">
										
										<button class="btn blue" type="submit"><i class="icon-ok"></i>完成</button>
										&nbsp;&nbsp;
										<a class="btn" onclick="cancle();">取消</a>
			
									</div>
								</form>
							</div>

						</div>

					</div>

				</div>
			</div>
		</div>
	</div>
	<script src="${resPath}media/js/app.js"></script>   
	<script>
		jQuery(document).ready(function() { 		   
		   $("#inputForm").validate({
			   passwd2: {  
				   required: true,  
				   minlength: 5,  
				   equalTo: "#passwd"  
			   } 

		   });
		   App.init();
		});
		function cancle(){
			window.location = "${basePath}student";
		}
	</script>
</body>
</html>
